package com.pagodabox.mc437_2012s2_banco_ws.ws;

public class BancoApiPortTypeProxy implements com.pagodabox.mc437_2012s2_banco_ws.ws.BancoApiPortType {
  private String _endpoint = null;
  private com.pagodabox.mc437_2012s2_banco_ws.ws.BancoApiPortType bancoApiPortType = null;
  
  public BancoApiPortTypeProxy() {
    _initBancoApiPortTypeProxy();
  }
  
  public BancoApiPortTypeProxy(String endpoint) {
    _endpoint = endpoint;
    _initBancoApiPortTypeProxy();
  }
  
  private void _initBancoApiPortTypeProxy() {
    try {
      bancoApiPortType = (new com.pagodabox.mc437_2012s2_banco_ws.ws.BancoApiServiceLocator()).getBancoApiPort();
      if (bancoApiPortType != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)bancoApiPortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)bancoApiPortType)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (bancoApiPortType != null)
      ((javax.xml.rpc.Stub)bancoApiPortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.pagodabox.mc437_2012s2_banco_ws.ws.BancoApiPortType getBancoApiPortType() {
    if (bancoApiPortType == null)
      _initBancoApiPortTypeProxy();
    return bancoApiPortType;
  }
  
  public com.pagodabox.mc437_2012s2_banco_ws.ws.Boleto emitir_boleto(java.lang.String cnpj_contrato_convenio, java.lang.String token, java.lang.String cliente, float valor) throws java.rmi.RemoteException{
    if (bancoApiPortType == null)
      _initBancoApiPortTypeProxy();
    return bancoApiPortType.emitir_boleto(cnpj_contrato_convenio, token, cliente, valor);
  }
  
  public java.lang.String cancelar_boleto(java.lang.String cnpj_contrato_convenio, java.lang.String token, int id) throws java.rmi.RemoteException{
    if (bancoApiPortType == null)
      _initBancoApiPortTypeProxy();
    return bancoApiPortType.cancelar_boleto(cnpj_contrato_convenio, token, id);
  }
  
  public com.pagodabox.mc437_2012s2_banco_ws.ws.Boleto obter_boleto(java.lang.String cnpj_contrato_convenio, java.lang.String token, int id) throws java.rmi.RemoteException{
    if (bancoApiPortType == null)
      _initBancoApiPortTypeProxy();
    return bancoApiPortType.obter_boleto(cnpj_contrato_convenio, token, id);
  }
  
  
}